package entities;

import com.haxepunk.Entity;
import com.haxepunk.graphics.Image;
import com.haxepunk.tmx.TmxObject;
import flash.geom.Point;
import hxcollision.shapes.Polygon;
import hxcollision.Collision;
import entities.*;

/**
 * ...
 * @author Marcelo Ruben Guardia
 */
class MetalPlatform extends Entity
{
	private var imgPlatform:Image;
	private var v:Point;
	private var polygon:Polygon;

	public function new(obj:TmxObject) 
	{
		super(obj.x, obj.y);
		imgPlatform = new Image(GC.IMG_platform);
		setHitbox(75, 40);
		polygon = Polygon.rectangle(x, y, 75, 40);
		
		graphic = imgPlatform;
		type = "solid";//
		name = "platform";
		this.collidable = true;
		layer = 1;
		v = new Point();
	}
	
	override public function update():Void
	{
		super.update();

	}
	
	public function GetPolygon():Polygon
	{
		return polygon;
	}
	
}